package poo.esempi;

import java.util.Scanner;
import java.util.StringTokenizer;

public class TokenizzazioneConJava {

	private static Scanner sc;

	public static void main(String[] args) {

		sc = new Scanner(System.in);
		System.out.print(">");
		String linea = sc.nextLine();
		StringTokenizer st = new StringTokenizer(linea, " ,;.:",true);

		while (st.hasMoreTokens()) {
			String tk = st.nextToken();
			System.out.println(tk);
		}

	}

}
